package cn.faster.sys.mapper;

import cn.faster.sys.entity.SysRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 *
 * @author xiaoCoder
 * @since 2021-06-10
 */

@Mapper
public interface SysRoleMapper extends BaseMapper<SysRole> {

   /**
	* 根据id查询Role
	*/
	SysRole getRoleById(@Param(value = "id") Integer id) throws Exception;

	/**
	* 查询Role列表
	*/
	List<SysRole> listRole(Map<String, Object> map) throws Exception;


	/**
	* 新增Role
	*/
	Integer addRole(SysRole sysRole) throws Exception;

	/**
	* 更新Role
	*/
	Integer updateRole(SysRole sysRole) throws Exception;

	/**
	* 根据id物理删除Role
	*/
	Integer deleteRoleById(@Param(value = "id") Integer id)	throws Exception;

	/**
	* 根据id逻辑删除Role
	*/
	Integer removeRoleById(@Param(value = "id") Integer id)	throws Exception;
}
